<?php


require_once("classes/newsletter.class.php");
$id = $_GET['newsletter'];

$newsletter = new Newsletter();

$info = $newsletter->searchObjectInfo($id);
$content = $newsletter->searchObjectCont($id);

$listInfo = mysql_fetch_assoc($info);
//$listContent = mysql_fetch_assoc($content);


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Newsletter - <?php echo $listInfo['numero'];?> </title>





</head>

<body style="background:url(http://www.qualisample.com/controller/newsletter/images/bg1024x768.jpg) repeat-x scroll bottom;
font-family:Verdana, Geneva, sans-serif;
font-size:11px;	
margin: 0px;">
<table width="580" border="0" align="center" cellpadding="10" cellspacing="2" >
  <tr>
    <td colspan="2"><img src="http://www.qualisample.com/controller/newsletter/images/logoen.jpg" width="579" height="62" /></td>
  </tr>
  <tr>
    <td colspan="2">

	
	<?php 
	
	$ano = $listInfo['ano'];
	$numero = $listInfo['numero'];;
	$mes = $listInfo['mes'];
	
	
	
	
	?>
    
    <span style='padding-right:100px;text-align:left;height:30px;color:#900;font-weight:bold;'>
		Ano: <?php echo $ano; ?>
		</span>
    	<span style='padding-right:100px;text-align:left;height:30px;color:#900;font-weight:bold;'>
		No.: <?php echo $numero; ?>
		</span>
    	<span style='padding-right:100px;text-align:left;height:30px;color:#900;font-weight:bold;'>
		M&ecirc;s: <?php echo $mes ; ?>
		</span>
    
    </td>
  </tr>
  <tr >
    <td colspan="2" bgcolor="#F4F4F4"><p style="text-align:justify;">
    <h1 style="font-family:Verdana, Geneva, sans-serif;font-size: 14px;
    font-weight:bold;color:#900"><?php 
while($textInfo =mysql_fetch_assoc($content) ){
	
	if($textInfo['ordem']==1){
		
	
	$titulo = $textInfo['titulo'];
	$noticia = $textInfo['resumo'];
	$link = $textInfo['link'];
	}elseif($textInfo['ordem']==2){
		
	
	$titulo2 = $textInfo['titulo'];
	$noticia2 = $textInfo['resumo'];
	$link2 = $textInfo['link'];
	}elseif($textInfo['ordem']==3){
		
	
	$titulo3 = $textInfo['titulo'];
	$noticia3 = $textInfo['resumo'];
	$link3 = $textInfo['link'];
	}
	
	}
echo($titulo);
	?></h1><?php
    echo($noticia);
	?>
    <br />
     </p><br />
   <a href="<?php
    echo($link);
	?>">read more...</a></td>
  </tr>
  <tr >
    <td width="50%" bgcolor="#DDDDDD" >
   <p style="text-align:justify;">
  <h1 style="font-family:Verdana, Geneva, sans-serif;font-size: 14px;
    font-weight:bold;color:#900"> <?php 

echo($titulo2);
	?></h1><?php
    echo($noticia2);
	?>
    <br />
     </p><br />
   <a href="<?php
    echo($link2);
	?>">Leia Mais</a></td>
    <td width="50%" bgcolor="#DDDDDD" >
  <p style="text-align:justify;">
  <h1 style="font-family:Verdana, Geneva, sans-serif;font-size: 14px;
    font-weight:bold;color:#900"> <?php 

echo($titulo3);
	?></h1><?php
    echo($noticia3);
	?>
    <br />
     </p><br />
   <a href="<?php
    echo($link3);
	?>">Leia Mais</a></td>
  </tr>
  <tr>
    <td colspan="2" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="center" >Copyright &copy; 2012 QualiSample - A division of Across Research Ltd., All rights reserved.<br />
  
    <em>You are receiving this email because you are in our database or you took part in one of our previous research projects. </em></td>
  </tr>
  <tr>
    <td colspan="2" ><p>Our mailing address is:<br />
           QualiSample - A division of Across Research Ltd.<br />
           Anerley Town Hall<br />
           Anerley Road<br />
          London, Eng SE20 8BD</p></td>
  </tr>
  <tr>
    <td colspan="2" ><a target="_blank" href="http://www.facebook.com/people/QualiSample-Painel-Intercultural/100000013883173">
<img src="http://www.qualisample.com/controller/newsletter/images/FaceBook_32x32.png" alt="Become Friend" width="32" height="32" border="0"/></a>
<a target="_blank" href="http://twitter.com/QualiSample"><img src="http://www.qualisample.com/controller/newsletter/images/Twitter_32x32.png" alt="Follow Us" width="32" height="32" border="0"/></a></td>
  </tr>
</table>


</body>
</html>